import { Injectable } from '@angular/core';
import { HttpClient } from '../../../providers/httpClient';
import { Config } from '../../../providers/config';

@Injectable()
export class TaskListService {
	constructor(
		public httpClient: HttpClient,
		public config: Config
	) { }
	getListData(page, type, isShowLoading) {
		let postBody = {
			"module": "OAServer",
			"method": "getTaskWkiDtoList",
			"params": {
				"loginId": "",
				"page": page,
				"pageSize": this.config.pageSize,
				"wkiType": type
			}
		}

		return this.httpClient.post(postBody, {
			isShowLoading: isShowLoading
		});
	}

	/**
	 * [selectAllInfo 获取业务实例信息]
	 * @param {[type]} bosid [description]
	 */
	selectAllInfo(bosid) {
		let postBody = {
			"module": "BusinessObject",
			"method": "selectAllInfo",
			"params": {
				"loginId": "fengjk",
				"bosid": bosid
			}
		}
		return this.httpClient.post(postBody, {
			isShowLoading: true
		});
	}
}
